﻿using System;
using System.Collections.Generic;
using System.Text;

namespace MazeRaider
{
    class MathUtil
    {
        private static double EPSILON = 0.001;

        public static bool AreAbsolutesEqual(double a, double b)
        {
            return Math.Abs(Math.Abs(a) - Math.Abs(b)) < EPSILON;
        }

        public static double CalculateDistance(RobotInfo i1, RobotInfo i2)
        {
            return Math.Sqrt(Math.Pow(i1.X - i2.X, 2) + Math.Pow(i1.Y - i2.Y, 2));
        }
    }
}
